package cn.wolfcode.enums;

public enum NoticeEnum {
    URGENCY("紧急",0),
    IMPORT("重要",1),
    COMMON("普通",2);
    private String name;
    private Integer value;

    NoticeEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public static String findName(Integer value){
        NoticeEnum[] values = NoticeEnum.values();
        for (NoticeEnum a:values){
            if (a.value.equals(value)){
                return a.name;
            }
        }
        return null;
    }
}
